<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>我的电商系统</title>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/bootstrap.min.css">
	<link rel="stylesheet" type="__PUBLIC__/css/bootstrap-theme.min.css">
	<link rel="stylesheet" href="__PUBLIC__/nivo/nivo-slider.css" type="text/css" media="screen" />
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/front.css">
</head>
<body>
	<div class="container front">
<!--head-->	
		<include file="./Application/Home/View/head.php" />
<!--banner-->
		<div class="row" id="banner">
			<div class="col-md-3 ">
				<div class="list-group">
					<a href="#" class="list-group-item  first"><i class="glyphicon glyphicon-align-justify"></i>
						所有分类
					</a>
					<?php 
						foreach ($catalog as $c) {
					?>
					<a href="<?php echo  U('home/prodect/lists/catalog_id/'.$c['id']) ?>" class="list-group-item"><?php echo $c['name'] ?></a>
					<?php
						} 
					?>
				</div>
			</div>
			<div class="col-md-9">
    			<div id="slider" class="nivoSlider">
        		<img src="__PUBLIC__/img/slider1.jpg" alt="" />
        		<img src="__PUBLIC__/img/slider2.jpg" alt="" />
        		<img src="__PUBLIC__/img/slider3.jpg" alt="" />
        		<img src="__PUBLIC__/img/slider4.jpg" alt="" />	
    			</div>
			</div>	
		</div>
<!--main-->
		<div class="row">
			<div class="col-md-8 ">
				<?php foreach ($prodects as $p) 
					{
				?>
				<div class="item clearfix">
					<img src="__ROOT__<?php echo  $p['img'];?>">
					<h1><a href="<?php echo U('home/prodect/detail/id/'.$p['id']) ?>"><?php echo $p['title'] ;?></h1></a>
					<p><?php echo $p['desc']; ?></p>
					<div id="price">¥<?php echo number_format($p['price'],2);?></div>
					<a href="<?php echo U('home/prodect/detail/id/'.$p['id']);?>" class="btn btn-danger" id="buy">立即抢购
					</a>
				</div>
				<?php	
					} 
				?>	
			</div>
			<div class="col-md-4">
				<div id="ad"></div>
				<div id="lable">
				  <!-- Nav tabs -->
					<ul class="nav nav-tabs nav-justified" role="tablist">
						<li role="presentation" class="active"><a href="#notice"  data-toggle="tab">公告</a></li>
						<li role="presentation"><a href="#news" " data-toggle="tab">新闻</a></li>
					</ul>
				  <!-- Tab panes -->
				  	<div class="tab-content">
					    <div role="tabpanel" class="tab-pane active" id="notice">
					    	<ul>
					    		<?php foreach ($notices as $n) {
					    		?>
					    			<li><a href="###"><?php echo $n['title'] ?></a></li>
					    		<?php
					    		} ?>
					    	</ul>
					    </div>
					    <div role="tabpanel" class="tab-pane" id="news">
							<ul>
								<?php foreach ($news as $news) {
					    		?>
					    			<li><a href="###"><?php echo $news['title'] ?></a></li>
					    		<?php
					    		} ?>
					    	</ul>
					    </div>
				  	</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-md-12">
				<div class="first">
					<?php
						$i=1; 
						$catalog_id=array(100,130,103);
						foreach ($catalog_id as $ci) {
							$goods=M('prodect')->where('catalog_id='.$ci.' and recommend=0')->limit(6)->select();
							$recommend=M('prodect')->where('catalog_id='.$ci.'  and recommend=1')->find();//取一条
							$pc=M('prodect_catalog')->where('id='.$ci)->find();
						?>	
					<div><span><?php echo $i ?>f</span><?php echo $pc['name'] ?></div>
					<br/>
					<div class="main clearfix">
						<div class="left clearfix">
							<img src="__ROOT__<?php echo $recommend['img'] ?>" id="img">
							<h4><a href="<?php echo U('home/prodect/detail/id/'.$recommend['id']) ?>"><?php echo $recommend['title'] ?></a></h4>
							<p id="p"><?php echo $recommend['desc'] ?></p>
							<div class="price">￥<?php echo number_format($recommend['price'],2) ?></div>
							<a href="<?php echo U('home/prodect/detail/id/'.$recommend['id']) ?>" class="btn btn-danger " id="buy">立即抢购</a>
						</div>
						<?php foreach ($goods as $g) 
							{
						?>
						<div class="it">
							<img src="__ROOT__<?php echo $g['img'] ?>" id="image">
							<div class="title"><a href="<?php echo U('home/prodect/detail/id/'.$g['id']) ?>"><?php echo $g['title'] ?></a></div>
							<div class="price">￥<?php echo number_format($g['price'],2) ?></div>
						</div>
						<?php
							}
						?>
					</div>
						<br/>
					<?php 
						$i++;		
						}
					?>
				</div>
			</div>
		</div>
		<br/>
		<hr/>
		<div class="row">
			<div class="foot">
				<ul>
					<li><a href="">帮助中心</a></li>
					<li><a href="">购物指南</a></li>
					<li><a href="">配送方式</a></li>
					<li><a href="">支付方式</a></li>
				</ul>
			</div>
			<div class="foot">
				<ul>
					<li><a href="">技术支持</a></li>
					<li><a href="">售后网店</a></li>
					<li><a href="">常见问题</a></li>
				</ul>
			</div>
			<div class="foot">
				<ul>
					<li><a href="">关于商城</a></li>
					<li><a href="">公司介绍</a></li>
					<li><a href="">商城介绍</a></li>
					<li><a href="">联系客服</a></li>
				</ul>
			</div>
			<div class="foot">
				<ul>
					<li><a href="">关于我们</a></li>
					<li><a href="">商城手机版</a></li>
				</ul>
			</div>
			<div class="foot">
				<ul>
					<li><a href="">售后服务</a></li>
					<li><a href="">保修政策</a></li>
					<li><a href="">退换货政策</a></li>
					<li><a href="">退换货流程</a></li>
				</ul>
			</div>
		</div>
		<hr/>
		<div id="bottom">
			<p>未经goodjobs.cn同意，不得转载网站之所有招聘信息及作品 新安人才网版权所有&copy;2000-2016</p>
			<p>皖ICP备12018891号 经营许可证：皖B2-20080016</p>
		</div>		
	</div>
</body>
</html>
<script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/nivo/jquery.nivo.slider.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/bootstrap.min.js"></script>
	<script type="text/javascript">
	    $(window).load(function(){
	        $('#slider').nivoSlider({
        		prevText: "<i class='glyphicon glyphicon-chevron-left'></i>",
        		nextText:"<i class='glyphicon glyphicon-chevron-right'></i>" 
        	});
	    });
	</script>
